package com.wangfa.entity;

import lombok.Data;
import org.springframework.data.domain.Page;

import java.util.List;

@Data
public class MyPage<T> {

    private  long lotalElements=0;
    private List<T> content=null;
    private  int totalPages=0;
    private  int number=0;

    public MyPage(Page<T> page) {
        lotalElements = page.getTotalElements();
        content =page.getContent();
        totalPages =page.getTotalPages();
        number =page.getNumber();
        int size = page.getSize();
    }

    public MyPage() {

    }



}
